package com.bmslz.monitor.base.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Description: 监控项目
 * @Author: bobo
 * @Date:   2025-08-10
 * @Version: V1.0
 */
@Data
@TableName("m_project")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="m_project对象", description="监控项目")
public class Project {
    
	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
	private String id;
	/**用户id*/
	@ApiModelProperty(value = "用户id")
	private String userId;
	/**项目编号*/
    @ApiModelProperty(value = "项目编号")
	private String projectNo;
	/**项目名称*/
    @ApiModelProperty(value = "项目名称")
	private String projectName;
	/**采样频率*/
    @ApiModelProperty(value = "采样频率")
	private Integer projectRate;
	/**心跳时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "心跳时间")
	private Date heartTime;
	/**最新测点数据*/
    @ApiModelProperty(value = "最新测点数据")
	private String lastData;
	/**监控模型id*/
    @ApiModelProperty(value = "监控模型id")
	private String monitorModelId;
	/**监控模型编号*/
	@ApiModelProperty(value = "监控模型编号")
	private String monitorModelNo;
	/**告警模型ID*/
    @ApiModelProperty(value = "告警模型ID")
	private String alarmModelId;
	/**告警模型编号*/
	@ApiModelProperty(value = "告警模型编号")
	private String alarmModelNo;
	/**1 在线 0 离线*/
    @ApiModelProperty(value = "1 在线 0 离线")
	private String online;
	/**1 紧急 2 告警 3 预警*/
    @ApiModelProperty(value = "1 紧急 2 告警 3 预警")
	private String alarmIng;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;
	/**修改时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
	private Date updateTime;
	/**删除状态（0，正常，1已删除）*/
    @ApiModelProperty(value = "删除状态（0，正常，1已删除）")
	@TableLogic
	private String delFlag;
}
